<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<jsp:include page="../../common/jsp/taglibs.jsp"/>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>个人信息</title>
    <jsp:include page="../../common/jsp/head.jsp"/>
    <link href="${ctx}css/public.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<br />
<br />
<input id="type" type="hidden" value='set'/>
<input id="userId" type="hidden" value='<s:property value="user.id"/>'>
<form class="layui-form">
    <table class="layui-table">
        <tr>
            <td>
                <div class="layui-form-item">
                    <label class="layui-form-label"><em>*</em>用户名</label>
                    <div class="layui-input-inline" style="width:55%;">
                        <input id="userName" type="text" lay-verify="verifyUserName" class="layui-input"
                               value='<s:property value="user.userName"/>' size="20" maxlength="20">
                    </div>
                </div>
            </td>
            <td>
                <div class="layui-form-item">
                    <label class="layui-form-label"><em>*</em>登录名</label>
                    <div class="layui-input-inline" style="width:55%;">
                        <input id="loginName" type="text" lay-verify="verifyLoginName" class="layui-input"
                               value='<s:property value="user.loginName"/>' size="20" maxlength="20">
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="layui-form-item">
                    <label class="layui-form-label">性别</label>
                    <div class="layui-input-inline" style="width:55%;">
                        <input type="hidden" id="sexTemp" value='<s:property value="user.sex"/>'/>
                        <input type="radio" name="sex" value="0" title="女"/>
                        <input type="radio" name="sex" value="1" title="男"/>
                    </div>
                </div>
            </td>
            <td>
                <div class="layui-form-item">
                    <label class="layui-form-label">年龄</label>
                    <div class="layui-input-inline" style="width:55%;">
                        <input id="age" type="text" class="layui-input"
                               onkeyup="this.value=this.value.replace(/\D/g,'')"
                               onafterpaste="this.value=this.value.replace(/\D/g,'')"
                               value='<s:property value="user.age"/>' size="3" maxlength="3">
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="layui-form-item">
                    <label class="layui-form-label"><em>*</em>手机</label>
                    <div class="layui-input-inline" style="width:55%;">
                        <input id="cellphone" type="text" lay-verify="verifyPhone" class="layui-input" onBlur="validatePhone();"
                               onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"
                               value='<s:property value="user.cellphone"/>' size="15" maxlength="15">
                    </div>
                </div>
            </td>
            <td>
                <div class="layui-form-item">
                    <label class="layui-form-label">电话</label>
                    <div class="layui-input-inline" style="width:55%;">
                        <input id="telephone" type="text" lay-verify="verifyTele" class="layui-input"
                               onkeyup="this.value=this.value.replace(/[^\d-]/g,'')" onafterpaste="this.value=this.value.replace(/[^\d-]/g,'')"
                               value='<s:property value="user.telephone"/>' size="15" maxlength="15">
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div class="layui-form-item">
                    <label class="layui-form-label">邮箱</label>
                    <div class="layui-input-block">
                        <input id="email" type="text" lay-verify="verifyEmail" class="layui-input"
                               value='<s:property value="user.email"/>' size="40" maxlength="40">
                    </div>
                </div>
            </td>
        </tr>
        <tr>
        <tr>
            <td colspan="2">
                <div class="layui-form-item">
                    <label class="layui-form-label">公司</label>
                    <div class="layui-input-block" style="width:55%;padding-top: 9px;">
                        <s:property value="companyName" />
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="layui-form-item">
                    <label class="layui-form-label">部门</label>
                    <div class="layui-input-inline" style="width:55%;margin-top: 9px;">
                        <s:property value="groupName" />
                    </div>
                </div>
            </td>
            <td>
                <div class="layui-form-item">
                    <label class="layui-form-label">角色</label>
                    <div class="layui-input-inline" style="width:55%;margin-top: 9px;">
                        <s:property value="roleName" />
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align:center;">
                <div class="layui-input-block" style="margin-left:3px;">
                    <a id="submit" style="width:150px;" class="layui-btn" lay-submit lay-filter="submitButton">更新</a>
                </div>
            </td>
        </tr>
    </table>

</form>
</body>
</html>
<script type="text/javascript" src="${ctx}js/user/updateUser.js?version=${version}"></script>